const onHour = 60*60*1000;

const config = {
    staticPath: '/public',
    uploadPath: '/upload',   // 上传文件在静态资源子目录 实际地址为 /public/upload/[filename]
    defaultProt: '3000',
    token: {
        key: 'token',
        secret: 'jwt key',
        cookieKey: 'token',
        filePath: [/\/login/, /\/upload/],
        activeTime: onHour,
        coockieConfig: {
            domain: 'localhost',
            path: '/',
            maxAge: onHour
        }
    },
    cors: {
        credentials: true,
        origin: 'http://localhost:8080',
        allowMethods: ['GET', 'POST', 'DELETE'],
    }
}

module.exports = config;